<?php

class Info_Action_Default extends Kernel_Action_Abstract
{
    
    /**
     * Path to the file template.
     *
     * @var string
     */
    protected $_template = 'info/default.tpl';
    
    /**
     * Реализация обработки пользовательского запроса.
     *
     */
    protected function _process()
    {
        Application::getResponse()->assign('contents', $this->_getContents());
    }
    
    private function _getContents() 
    {
        $query = '
            SELECT 
                   `contents` 
              FROM 
                   `info` 
             WHERE 
                   `id` = ' . Info_Utils::CONTENTS_ID;
        return database::fetchOne($query);
    }
    
}